package com.sven.player.utils;

/**
 * Created by Sven on 2016/10/14 0014.
 */

public class TimeUtil {
    private static String to2Str(int i) {
        if (i > 9) {
            return i + "";
        } else {
            return "0" + i;
        }
    }

    public static String toTimeStr(int secTotal) {
        String result;
        int hour = secTotal / 3600;
        int min = (secTotal % 3600) / 60;
        int sec = (secTotal % 3600) % 60;
        result = /*to2Str(hour)+":"+*/to2Str(min) + ":" + to2Str(sec);
        return result;
    }
}
